package com.xyx.ssm.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xyx.ssm.jdbcdao.PurchaseDao;
import com.xyx.ssm.po.Purchase;
import com.xyx.ssm.po.Purchasesub;
import com.xyx.ssm.service.PurchaseService;
import com.xyx.ssm.util.Page;

@Service
public class PurchaseServiceImpl implements PurchaseService {
	@Autowired
	private PurchaseDao purchaseDao;

	@Override
	public Page<Map<String, Object>> findPage(Page<Map<String, Object>> page) {
		// TODO Auto-generated method stub
		return purchaseDao.findPage("com.xyx.ssm.jdbcdao.PurchaseDao.purchaseselect", page);
	}

	@Override
	public int insertpruchase(Purchase purchase) {
		// TODO Auto-generated method stub
		return purchaseDao.insertpruchase(purchase);
	}

	@Override
	public List<Map<String, Object>> selectWineproduct(Purchase purchase) {
		// TODO Auto-generated method stub
		return purchaseDao.selectWineproduct(purchase);
	}

	@Override
	public List<Purchase> selectdetail(Purchase purchase) {
		// TODO Auto-generated method stub
		return purchaseDao.selectdetail(purchase);
	}

	@Override
	public List<Purchase> selectdetailwine(Purchase purchase) {
		// TODO Auto-generated method stub
		return purchaseDao.selectdetailwine(purchase);
	}

	@Override
	public int insertwinepurchasesub(Purchasesub purchasesub) {
		// TODO Auto-generated method stub
		return purchaseDao.insertwinepurchasesub(purchasesub);
	}

	@Override
	public int updatepurchase(Purchase purchase) {
		// TODO Auto-generated method stub
		return purchaseDao.updatepurchase(purchase);
	}

}
